package com.hd.tiyu.yuejian.Model;

import com.hd.tiyu.yuejian.JavaBean.Actcate;
import com.hd.tiyu.yuejian.JavaBean.Activity;
import com.hd.tiyu.yuejian.JavaBean.Club;
import com.hd.tiyu.yuejian.JavaBean.ClubIntro;
import com.hd.tiyu.yuejian.JavaBean.Contest;
import com.hd.tiyu.yuejian.JavaBean.Dashi;
import com.hd.tiyu.yuejian.JavaBean.FaTie;
import com.hd.tiyu.yuejian.JavaBean.Master;
import com.hd.tiyu.yuejian.JavaBean.ShaituDetail;
import com.hd.tiyu.yuejian.JavaBean.Tiwen;
import com.hd.tiyu.yuejian.JavaBean.Train;
import com.hd.tiyu.yuejian.JavaBean.Training;
import com.hd.tiyu.yuejian.JavaBean.User;
import com.hd.tiyu.yuejian.JavaBean.YueJianIntro;
import com.hd.tiyu.yuejian.Service.ListsService;

import java.util.List;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/9/27.
 */

public class ListsModel {
    private Retrofit retrofit;
    public ListsModel(){
        retrofit = new Retrofit.Builder()
                .baseUrl("http://172.24.10.175/workout/api.php/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }
    public Call<List<Activity>> getlistsActivity(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsActivity();
    }
    public Call<List<Dashi>>getlistsMaster(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsMaster();
    }
    public Call<List<Contest>>getlistsContest(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsContest();
    }
    public Call<List<Club>>getlistsClub(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsClub();
    }
    public Call<List<Train>>getlistsTrain(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsTrain();
    }
    public Call<List<ShaituDetail>>getlistsShaireply(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsShaireply();
    }

    public Call<List<ShaituDetail>>getShaireply(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getShaireply(id);
    }
    public Call<List<Tiwen>>getlistsTiWen(String master_id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsTiWen(master_id);
    }

    public Call<String>putWenti(String user_id, String master_id, String question){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.putTiwen(user_id,master_id,question);
    }
    public Call<Actcate>getActivity(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getActivity(id);
    }
    public Call<Train>getTrain(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getTrain(id);
    }
    public Call<Master>getDashi(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getDashi(id);
    }
    public Call<Dashi>getDashiketang(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getDashiketang(id);
    }

    public Call<ClubIntro>getClubIntro(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getClubIntro(id);
    }

    public Call<User> Userinfo(String uid){
        ListsService listsModel=retrofit.create(ListsService.class);
        return listsModel.getUser(uid);
    }
    public Call<YueJianIntro> Intro(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getIntro();
    }

    public Call<String>guanzhu(String SessionID, String userid,String fan_id, String fans_type){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.gunazhu(SessionID,userid,fan_id,fans_type);
    }

    public Call<Integer>getClubState(String fan_id, String userid,String fan_type,String SessonID){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getClubState(fan_id,userid,fan_type,SessonID);
    }

    public Call<String>delete(String mod, String club_id,String user_id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.delete(mod,club_id,user_id);
    }

    public Call<List<FaTie>> getFaTie(String userid){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getFatie(userid);
    }

    public Call<Contest> getMatchDetail(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getMatchDetail(id);
    }









    public Call<Club>getClub(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return  listsService.getClub(id);
    }
    public Call<List<Training>>getlistsTraining(){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getlistsTraining();
    }
    public Call<Training>getTraining(String id){
        ListsService listsService=retrofit.create(ListsService.class);
        return listsService.getTraining(id);
    }
}
